package com.hopes.bizz.close.position.support;

import com.hopes.bizz.close.basic.entity.ClosedGpsDeviceEntity;
import com.hopes.bizz.close.position.dto.HazardCachePositionDTO;
import com.hopes.bizz.close.position.vo.HazardCachePositionVO;
import com.hopes.bizz.close.visitor.entity.ClosedHazardCarApplyEntity;
import com.hopes.boss.common.message.distribute.IMessage;
import com.hopes.boss.common.message.distribute.MessageSendBO;

import java.util.List;

/**
 * @author yumr
 * @ProjectName bizz
 * @Description Redis数据处理支撑类
 * @time 2024/1/30 16:05
 */
public interface RedisHandleSupport {

    /**
     * 消息发送
     * @param messageSend 数据
     */
    void messageSend(MessageSendBO messageSend);

    /**
     * 消息发送
     * @param messageList 消息集合
     */
    void messageSend(List<IMessage<?>> messageList);

    /**
     * websocket 发送数据
     * wsUrl
     * @param socketData 发送数据
     * @param wsUrl  websocketUrl
     */
    <T> void webSocketSend(T socketData, String wsUrl);

    /**
     * 构建危险品车辆定位数据
     * @param gpsDevice       GPS设备
     * @param hazardCarApply  危险品预约信息
     * @return                缓存定位数据
     */
    HazardCachePositionVO buildHazardCachePosition(HazardCachePositionDTO hazardCachePositionDTO, ClosedGpsDeviceEntity gpsDevice, ClosedHazardCarApplyEntity hazardCarApply);
}
